.case-card {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 移除hover动画效果 */

/* 响应式文本截断 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 3;
}

/* 平滑动画效果 */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.case-card {
  animation: slideInUp 0.6s ease-out forwards;
}

/* 为每个卡片添加延迟动画 */
.case-card:nth-child(1) {
  animation-delay: 0.1s;
}
.case-card:nth-child(2) {
  animation-delay: 0.2s;
}
.case-card:nth-child(3) {
  animation-delay: 0.3s;
}
.case-card:nth-child(4) {
  animation-delay: 0.4s;
}
.case-card:nth-child(5) {
  animation-delay: 0.5s;
}
.case-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* 确保图片容器的长宽比 */
.case-card img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .case-card {
    margin-bottom: 1rem;
  }

  .line-clamp-3 {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* 垂直布局卡片样式 */
.case-card-vertical {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  will-change: transform, box-shadow;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 移除hover动画效果 */

/* 行业标签样式 */
.case-card-vertical .inline-flex {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  will-change: transform;
  backface-visibility: hidden;
}

/* 平滑动画效果 - 减少闪动 */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px) translateZ(0);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

.case-card-vertical {
  animation: slideInUp 0.4s ease-out forwards;
  animation-fill-mode: both;
}

/* 为每个卡片添加延迟动画 - 减少延迟时间 */
.case-card-vertical:nth-child(1) {
  animation-delay: 0.05s;
}
.case-card-vertical:nth-child(2) {
  animation-delay: 0.1s;
}
.case-card-vertical:nth-child(3) {
  animation-delay: 0.15s;
}
.case-card-vertical:nth-child(4) {
  animation-delay: 0.2s;
}
.case-card-vertical:nth-child(5) {
  animation-delay: 0.25s;
}
.case-card-vertical:nth-child(6) {
  animation-delay: 0.3s;
}

/* 分隔线样式 */
.case-card-vertical + div {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

/* 确保图片容器的长宽比 */
.case-card-vertical img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  will-change: transform;
  backface-visibility: hidden;
}

/* 移动端优化 */
@media (max-width: 1024px) {
  .case-card-vertical {
    margin-bottom: 1rem;
  }
}

/* 响应式图片高度调整 */
@media (max-width: 1024px) {
  .case-card-vertical .relative {
    height: 200px;
  }
}

/* 移除图片hover缩放效果 */

/* 内容区域的响应式调整 */
@media (max-width: 768px) {
  .case-card-vertical .flex-1 {
    padding: 1.5rem;
  }

  .case-card-vertical h3 {
    font-size: 1.5rem;
  }

  .case-card-vertical p {
    font-size: 1rem;
  }
}

/* 标签的响应式调整 */
@media (max-width: 768px) {
  .case-card-vertical .absolute.top-4.left-4 {
    top: 0.75rem;
    left: 0.75rem;
  }

  .case-card-vertical .inline-flex {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* 现代化卡片样式 - 自适应高度 */
.case-card-modern {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow:
    0 16px 32px -8px rgba(0, 0, 0, 0.12),
    0 8px 16px -4px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5);
  will-change: transform, box-shadow, border-color;
  backface-visibility: hidden;
  transform: translateZ(0);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* 移除固定高度，允许内容撑开 */
  min-height: 300px;
  height: auto;
}

/* 卡片hover上浮效果 */
.case-card-modern:hover {
  transform: translateY(-8px) translateZ(0);
  box-shadow:
    0 32px 64px -12px rgba(0, 0, 0, 0.18),
    0 16px 32px -8px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8);
}

/* 现代化卡片动画 */
.case-card-modern {
  animation: slideInUp 0.6s ease-out forwards;
  animation-fill-mode: both;
}

.case-card-modern:nth-child(1) {
  animation-delay: 0.1s;
}
.case-card-modern:nth-child(2) {
  animation-delay: 0.2s;
}
.case-card-modern:nth-child(3) {
  animation-delay: 0.3s;
}
.case-card-modern:nth-child(4) {
  animation-delay: 0.4s;
}
.case-card-modern:nth-child(5) {
  animation-delay: 0.5s;
}
.case-card-modern:nth-child(6) {
  animation-delay: 0.6s;
}

/* 现代化卡片响应式优化 - 自适应高度版本 */
@media (max-width: 1024px) {
  .case-card-modern {
    border-radius: 20px;
    margin-bottom: 1rem;
    min-height: 280px;
  }

  .case-card-modern > div:first-child {
    padding: 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .case-card-modern {
    border-radius: 16px;
    min-height: 260px;
  }

  .case-card-modern > div:first-child {
    padding: 1.25rem !important;
  }

  .case-card-modern h3 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
  }

  .case-card-modern p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }

  .case-card-modern button {
    padding: 0.5rem 1.25rem !important;
    font-size: 0.9rem !important;
  }

  /* 移动端垂直布局 */
  .case-card-modern .flex {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  /* 移动端图片区域调整 */
  .case-card-modern .flex > div:first-child {
    width: 100% !important;
  }

  /* 移动端图片高度调整 */
  .case-card-modern .relative {
    height: 10rem !important;
  }
}

@media (max-width: 480px) {
  .case-card-modern {
    border-radius: 12px;
    min-height: 240px;
  }

  .case-card-modern > div:first-child {
    padding: 1rem !important;
  }

  .case-card-modern h3 {
    font-size: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }

  .case-card-modern p {
    font-size: 0.875rem !important;
    margin-bottom: 1rem !important;
  }

  .case-card-modern button {
    padding: 0.4rem 1rem !important;
    font-size: 0.8rem !important;
  }

  /* 超小屏幕优化 */
  .case-card-modern .relative {
    height: 8rem !important;
  }

  .case-card-modern .flex {
    gap: 1rem !important;
  }
}

/* 减少动画在低性能设备上的闪动 */
@media (prefers-reduced-motion: reduce) {
  .case-card-vertical {
    animation: none;
    transition: none;
  }

  .case-card-modern {
    animation: none;
    transition:
      transform 0.3s ease,
      box-shadow 0.3s ease;
  }

  .case-card-modern:hover {
    transform: translateY(-4px) translateZ(0);
  }

  .case-card-modern::before {
    display: none;
  }
}
